Skip to content

Conversation

QuietMisdreavus
Copy link
Contributor

@QuietMisdreavus QuietMisdreavus commented Jul 22, 2018

This changes gives an effect to the default-target option. A crate that adds a default-target to their docs.rs metadata in Cargo.toml will cause docs.rs/my_crate/$VERSION (and docs.rs/my_crate) to redirect to docs.rs/my_crate/$VERSION/$DEFAULT_TARGET/my_crate (assuming a build target of my_crate).

Caveat: the redirect doesn't check that the target has docs available. I'm not sure why but my local clone doesn't properly build and save docs for all targets, so accessing localhost:3000/winapi redirects properly to localhost:3000/winapi/0.3.5/x86_64-pc-windows-msvc/winapi/, but immediately hits a 404. This would work in docs.rs's production environment, but i want to look into adding a check, regardless. whoops that was easier than i thought, all good now. I mean, the bug where it doesn't seem to get the docs for all the targets in a local clone still exists, but at least we don't get bogus redirects now.

@QuietMisdreavus QuietMisdreavus changed the title [wip] add support for default-target add support for default-target Jul 22, 2018
@QuietMisdreavus
Copy link
Contributor Author

Closing in favor of #255, which has already merged

@QuietMisdreavus QuietMisdreavus deleted the default-target branch November 2, 2018 13:08
@onur onur mentioned this pull request Feb 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant